<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>
    <style type="text/css">
        #panel,#flip {
            padding:5px;
            text-align:center;
            background-color:#e5eecc;
            border:solid 1px #c3c3c3;
        }
        #panel {
            padding:50px;
            display:none;
        }
    </style>
</head>

<body>

    <div id="flip">点我滑下面板</div>
    <div id="panel">Hello world!</div>

    <script>
        $(function () {
            var count=0;
            $('#flip').click(function () {
                count++;
                if(count===1){
                    $('#panel').slideDown("slow");
                    $('#flip').html("点我滑起面板");
                }else if(count===2){
                    $('#panel').slideUp("slow");
                    $('#flip').html("点我滑下面板");
                    count=0
                }
            })
        })
    </script>
</body>
</html>